Crate to_tokenstream
source ·Expand description
A simple interface for building compilers within the Rust pre-processor. Generally implemented on the node types of an abstract syntax tree (AST), this crate defines a uniform interface that a compiler can call to generate rust code. Output will be a TokenStream, which can be converted to a string (with .to_string()) or used in a macro to generate rust code.
Structs
- An abstract stream of tokens, or more concretely a sequence of token trees.
Traits
- A trait for an object that can be converted to Rust code. Any data structure implementing this trait can be converted into a proc_macro2::TokenStream.